<!doctype html>
<html>
	<head>
		<title>HPP</title>
		<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="js/underscore.js"></script>
		<script type="text/javascript" src="js/backbone.js"></script>
		<style>
			* {
				margin: 0;
				padding: 0;
			}
			html, body {
				padding: 10px;
			}
			#listContainer {
			    margin: 10px 0px 0px 5px;
				overflow: hidden;
			}
			a:hover {
				color: red;
			}
			a{
			    margin:5px;
			}
			div{
			    color:#CD0A0A; 
			    margin-top:5px;
			}
		</style>
	</head>
	<body>
		<div>
			HHP API
		</div>
		<br />
		<div">
			Beispiele:
		</div>
		<div id="listContainer"></div>
	</body>
</html>

<script>
$(function(){
	var listContent=''; 
	listContent+=getHtmlOfA("letter/W20B0001","ID");
	
	/*********************************************/
	/**************  Person **********************/
	
	listContent+=getHtmlOfA("letters/filter/person/Adam Gurowski","Person");
	// single character
	listContent+=getHtmlOfA("letters/filter/person/name/alphabetical/a","single character (Nachname, Vorname braucht nicht)");
	// character range (evtl.)
	listContent+=getHtmlOfA("letters/filter/person/name/alphabetical/a/f",'character range');

	/*********************************************/
	/**************  Zeit **********************/ 
	listContent+=getHtmlOfA("letters/filter/time/1848",'Jahr');
	listContent+=getHtmlOfA("letters/filter/time/1848/count",'Anzahl pro Jahr');
	listContent+=getHtmlOfA("letters/filter/time/1848/limit/0/100",'Teilmenge pro Jahr');
	// month
	listContent+=getHtmlOfA("letters/filter/time/1848-05","Monat");
	listContent+=getHtmlOfA("letters/filter/time/1848-05/count","");
	listContent+=getHtmlOfA("letters/filter/time/1848-05/limit/1/2","");
	// date
	listContent+=getHtmlOfA("letters/filter/time/1848-05-17","Datum");
	listContent+=getHtmlOfA("letters/filter/time/1848-05-17/count","");
	listContent+=getHtmlOfA("letters/filter/time/1848-05-17/limit/2/10","");

	// range
	listContent+=getHtmlOfA("letters/filter/time/1848/1849","Jahr Range");
	listContent+=getHtmlOfA("letters/filter/time/1848/1849/count","");
	listContent+=getHtmlOfA("letters/filter/time/1848/1849/limit/0/2","");
	listContent+=getHtmlOfA("letters/filter/time/1848-05/1849-09","Monat Range");
	listContent+=getHtmlOfA("letters/filter/time/1848-05/1849-09/count","");
	listContent+=getHtmlOfA("letters/filter/time/1848-05/1849-09/limit/1/3","");
	listContent+=getHtmlOfA("letters/filter/time/1848-05-01/1849-08-31","Datum Range");
    listContent+=getHtmlOfA("letters/filter/time/1848-05-01/1849-08-31/count","");
    listContent+=getHtmlOfA("letters/filter/time/1848-05-01/1849-08-31/limit/2/19","");
    
    //location
    listContent+=getHtmlOfA("letters/filter/place/Hamburg","Location");
    listContent+=getHtmlOfA("letters/filter/place/Hamburg/count","");
    listContent+=getHtmlOfA("letters/filter/place/Hamburg/limit/0/20","");
    
    //category
    listContent+=getHtmlOfA("letters/filter/category/Albumblatt","Kategorie");
    listContent+=getHtmlOfA("letters/filter/category/Albumblatt/count","");
    listContent+=getHtmlOfA("letters/filter/category/Albumblatt/limit/0/20","");
    
    
	
	$('#listContainer').html(listContent);
	
   
 }); 
 function getHtmlOfA(str, str2){
     if(str2){
         str2=' <span>('+str2+')</span>';
     }else{
         str2='';
     }
        return '<a target="_blank" href="' + str + '" >' + str + '</a>'+str2+'<br/>';
 }
</script>